.class public Lcom/sponsorpay/sdk/android/utils/HostInfo;
.super Ljava/lang/Object;
.source "HostInfo.java"


# static fields
.field private static final ANDROID_OS_PREFIX:Ljava/lang/String; = "Android OS "

.field private static final CONNECTION_TYPE_CELLULAR:Ljava/lang/String; = "cellular"

.field private static final CONNECTION_TYPE_WIFI:Ljava/lang/String; = "wifi"

.field private static final SCREEN_DENSITY_CATEGORY_VALUE_EXTRA_HIGH:Ljava/lang/String; = "EXTRA_HIGH"

.field private static final SCREEN_DENSITY_CATEGORY_VALUE_HIGH:Ljava/lang/String; = "HIGH"

.field private static final SCREEN_DENSITY_CATEGORY_VALUE_LOW:Ljava/lang/String; = "LOW"

.field private static final SCREEN_DENSITY_CATEGORY_VALUE_MEDIUM:Ljava/lang/String; = "MEDIUM"

.field private static final SCREEN_DENSITY_CATEGORY_VALUE_TV:Ljava/lang/String; = "TV"

.field private static final UNDEFINED_VALUE:Ljava/lang/String; = "undefined"

.field protected static sSimulateInvalidAndroidId:Z

.field protected static sSimulateNoAccessNetworkState:Z

.field protected static sSimulateNoAccessWifiStatePermission:Z

.field protected static sSimulateNoHardwareSerialNumber:Z

.field protected static sSimulateNoReadPhoneStatePermission:Z


# instance fields
.field private mAndroidId:Ljava/lang/String;

.field private mAppVersion:Ljava/lang/String;

.field private mCarrierCountry:Ljava/lang/String;

.field private mCarrierName:Ljava/lang/String;

.field private mConnectionType:Ljava/lang/String;

.field private mContext:Landroid/content/Context;

.field private mDisplayMetrics:Landroid/util/DisplayMetrics;

.field private mHardwareSerialNumber:Ljava/lang/String;

.field private mLanguageSetting:Ljava/lang/String;

.field private mOsVersion:Ljava/lang/String;

.field private mPhoneVersion:Ljava/lang/String;

.field private mScreenDensityCategory:Ljava/lang/String;

.field private mScreenDensityX:F

.field private mScreenDensityY:F

.field private mScreenHeight:I

.field private mScreenWidth:I

.field private mUDID:Ljava/lang/String;

.field private mWifiMacAddress:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 53
    sput-boolean v0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoReadPhoneStatePermission:Z

    .line 54
    sput-boolean v0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoAccessWifiStatePermission:Z

    .line 55
    sput-boolean v0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateInvalidAndroidId:Z

    .line 56
    sput-boolean v0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoHardwareSerialNumber:Z

    .line 57
    sput-boolean v0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoAccessNetworkState:Z

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 10
    .parameter "context"

    .prologue
    .line 226
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 227
    iput-object p1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mContext:Landroid/content/Context;

    .line 229
    sget-boolean v8, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoReadPhoneStatePermission:Z

    if-nez v8, :cond_1

    .line 232
    const-string v8, "phone"

    invoke-virtual {p1, v8}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v5

    .line 231
    check-cast v5, Landroid/telephony/TelephonyManager;

    .line 234
    .local v5, tManager:Landroid/telephony/TelephonyManager;
    :try_start_0
    invoke-virtual {v5}, Landroid/telephony/TelephonyManager;->getDeviceId()Ljava/lang/String;

    move-result-object v8

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mUDID:Ljava/lang/String;

    .line 235
    invoke-virtual {v5}, Landroid/telephony/TelephonyManager;->getNetworkOperatorName()Ljava/lang/String;

    move-result-object v8

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mCarrierName:Ljava/lang/String;

    .line 236
    invoke-virtual {v5}, Landroid/telephony/TelephonyManager;->getNetworkCountryIso()Ljava/lang/String;

    move-result-object v8

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mCarrierCountry:Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_0

    .line 248
    .end local v5           #tManager:Landroid/telephony/TelephonyManager;
    :goto_0
    sget-boolean v8, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoAccessNetworkState:Z

    if-nez v8, :cond_4

    .line 249
    iget-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mContext:Landroid/content/Context;

    .line 250
    const-string v9, "connectivity"

    invoke-virtual {v8, v9}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    .line 249
    check-cast v2, Landroid/net/ConnectivityManager;

    .line 252
    .local v2, mConnectivity:Landroid/net/ConnectivityManager;
    invoke-virtual {v2}, Landroid/net/ConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;

    move-result-object v1

    .line 253
    .local v1, info:Landroid/net/NetworkInfo;
    if-nez v1, :cond_2

    .line 254
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mConnectionType:Ljava/lang/String;

    .line 266
    .end local v1           #info:Landroid/net/NetworkInfo;
    .end local v2           #mConnectivity:Landroid/net/ConnectivityManager;
    :goto_1
    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v8

    invoke-virtual {v8}, Ljava/util/Locale;->toString()Ljava/lang/String;

    move-result-object v8

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mLanguageSetting:Ljava/lang/String;

    .line 269
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "Android OS "

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v9, Landroid/os/Build$VERSION;->RELEASE:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mOsVersion:Ljava/lang/String;

    .line 272
    new-instance v8, Ljava/lang/StringBuilder;

    sget-object v9, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;

    invoke-static {v9}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "_"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    sget-object v9, Landroid/os/Build;->MODEL:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mPhoneVersion:Ljava/lang/String;

    .line 275
    sget-boolean v8, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateInvalidAndroidId:Z

    if-nez v8, :cond_5

    .line 276
    iget-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mContext:Landroid/content/Context;

    invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v8

    const-string v9, "android_id"

    invoke-static {v8, v9}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mAndroidId:Ljava/lang/String;

    .line 278
    iget-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mAndroidId:Ljava/lang/String;

    if-nez v8, :cond_0

    .line 279
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mAndroidId:Ljava/lang/String;

    .line 285
    :cond_0
    :goto_2
    sget-boolean v8, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoAccessWifiStatePermission:Z

    if-nez v8, :cond_6

    .line 288
    :try_start_1
    iget-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mContext:Landroid/content/Context;

    const-string v9, "wifi"

    invoke-virtual {v8, v9}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Landroid/net/wifi/WifiManager;

    .line 289
    .local v7, wifiMan:Landroid/net/wifi/WifiManager;
    invoke-virtual {v7}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;

    move-result-object v6

    .line 290
    .local v6, wifiInf:Landroid/net/wifi/WifiInfo;
    invoke-virtual {v6}, Landroid/net/wifi/WifiInfo;->getMacAddress()Ljava/lang/String;

    move-result-object v8

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mWifiMacAddress:Ljava/lang/String;
    :try_end_1
    .catch Ljava/lang/RuntimeException; {:try_start_1 .. :try_end_1} :catch_1

    .line 297
    .end local v6           #wifiInf:Landroid/net/wifi/WifiInfo;
    .end local v7           #wifiMan:Landroid/net/wifi/WifiManager;
    :goto_3
    return-void

    .line 237
    .restart local v5       #tManager:Landroid/telephony/TelephonyManager;
    :catch_0
    move-exception v0

    .line 238
    .local v0, e:Ljava/lang/SecurityException;
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mUDID:Ljava/lang/String;

    .line 239
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mCarrierName:Ljava/lang/String;

    .line 240
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mCarrierCountry:Ljava/lang/String;

    goto/16 :goto_0

    .line 243
    .end local v0           #e:Ljava/lang/SecurityException;
    .end local v5           #tManager:Landroid/telephony/TelephonyManager;
    :cond_1
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mUDID:Ljava/lang/String;

    .line 244
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mCarrierName:Ljava/lang/String;

    .line 245
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mCarrierCountry:Ljava/lang/String;

    goto/16 :goto_0

    .line 256
    .restart local v1       #info:Landroid/net/NetworkInfo;
    .restart local v2       #mConnectivity:Landroid/net/ConnectivityManager;
    :cond_2
    invoke-virtual {v1}, Landroid/net/NetworkInfo;->getType()I

    move-result v3

    .line 257
    .local v3, netType:I
    const/4 v8, 0x1

    if-ne v3, v8, :cond_3

    const-string v8, "wifi"

    :goto_4
    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mConnectionType:Ljava/lang/String;

    goto/16 :goto_1

    .line 258
    :cond_3
    const-string v8, "cellular"

    goto :goto_4

    .line 262
    .end local v1           #info:Landroid/net/NetworkInfo;
    .end local v2           #mConnectivity:Landroid/net/ConnectivityManager;
    .end local v3           #netType:I
    :cond_4
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mConnectionType:Ljava/lang/String;

    goto/16 :goto_1

    .line 282
    :cond_5
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mAndroidId:Ljava/lang/String;

    goto :goto_2

    .line 291
    :catch_1
    move-exception v4

    .line 292
    .local v4, re:Ljava/lang/RuntimeException;
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mWifiMacAddress:Ljava/lang/String;

    goto :goto_3

    .line 295
    .end local v4           #re:Ljava/lang/RuntimeException;
    :cond_6
    const-string v8, ""

    iput-object v8, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mWifiMacAddress:Ljava/lang/String;

    goto :goto_3
.end method

.method private getDisplayMetrics()Landroid/util/DisplayMetrics;
    .locals 3

    .prologue
    .line 135
    iget-object v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mDisplayMetrics:Landroid/util/DisplayMetrics;

    if-nez v1, :cond_0

    .line 136
    new-instance v1, Landroid/util/DisplayMetrics;

    invoke-direct {v1}, Landroid/util/DisplayMetrics;-><init>()V

    iput-object v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mDisplayMetrics:Landroid/util/DisplayMetrics;

    .line 137
    iget-object v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mContext:Landroid/content/Context;

    .line 138
    const-string v2, "window"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    .line 137
    check-cast v0, Landroid/view/WindowManager;

    .line 139
    .local v0, windowManager:Landroid/view/WindowManager;
    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v1

    iget-object v2, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mDisplayMetrics:Landroid/util/DisplayMetrics;

    invoke-virtual {v1, v2}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V

    .line 141
    .end local v0           #windowManager:Landroid/view/WindowManager;
    :cond_0
    iget-object v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mDisplayMetrics:Landroid/util/DisplayMetrics;

    return-object v1
.end method

.method private getScreenDensityCategoryFromModernAndroidDevice(I)Ljava/lang/String;
    .locals 11
    .parameter "densityCategoryDpi"

    .prologue
    const/4 v10, 0x2

    const/4 v9, 0x1

    const/4 v8, 0x0

    .line 321
    new-array v5, v10, [Ljava/lang/String;

    const-string v7, "DENSITY_XHIGH"

    aput-object v7, v5, v8

    const-string v7, "DENSITY_TV"

    aput-object v7, v5, v9

    .line 322
    .local v5, remainingScreenDensityCategoryStaticFieldNames:[Ljava/lang/String;
    new-array v0, v10, [Ljava/lang/String;

    const-string v7, "EXTRA_HIGH"

    aput-object v7, v0, v8

    const-string v7, "TV"

    aput-object v7, v0, v9

    .line 324
    .local v0, correspondingScreenDensityCategoryStringValues:[Ljava/lang/String;
    array-length v7, v5

    .line 325
    array-length v8, v0

    .line 324
    invoke-static {v7, v8}, Ljava/lang/Math;->min(II)I

    move-result v4

    .line 327
    .local v4, iterationLimit:I
    const/4 v1, 0x0

    .line 329
    .local v1, densityCategory:Ljava/lang/String;
    const/4 v3, 0x0

    .local v3, i:I
    :goto_0
    if-lt v3, v4, :cond_2

    .line 346
    :cond_0
    if-nez v1, :cond_1

    const-string v1, "undefined"

    .end local v1           #densityCategory:Ljava/lang/String;
    :cond_1
    return-object v1

    .line 331
    .restart local v1       #densityCategory:Ljava/lang/String;
    :cond_2
    :try_start_0
    const-class v7, Landroid/util/DisplayMetrics;

    .line 332
    aget-object v8, v5, v3

    invoke-virtual {v7, v8}, Ljava/lang/Class;->getField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v2

    .line 333
    .local v2, eachField:Ljava/lang/reflect/Field;
    const/4 v7, 0x0

    invoke-virtual {v2, v7}, Ljava/lang/reflect/Field;->getInt(Ljava/lang/Object;)I

    move-result v6

    .line 334
    .local v6, thisFieldvalue:I
    if-ne p1, v6, :cond_3

    .line 335
    aget-object v1, v0, v3
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 341
    .end local v2           #eachField:Ljava/lang/reflect/Field;
    .end local v6           #thisFieldvalue:I
    :cond_3
    :goto_1
    if-nez v1, :cond_0

    .line 329
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 337
    :catch_0
    move-exception v7

    goto :goto_1
.end method

.method public static setSimulateInvalidAndroidId(Z)V
    .locals 0
    .parameter "value"

    .prologue
    .line 68
    sput-boolean p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateInvalidAndroidId:Z

    .line 69
    return-void
.end method

.method public static setSimulateNoAccessNetworkState(Z)V
    .locals 0
    .parameter "value"

    .prologue
    .line 76
    sput-boolean p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoAccessNetworkState:Z

    .line 77
    return-void
.end method

.method public static setSimulateNoAccessWifiStatePermission(Z)V
    .locals 0
    .parameter "value"

    .prologue
    .line 64
    sput-boolean p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoAccessWifiStatePermission:Z

    .line 65
    return-void
.end method

.method public static setSimulateNoHardwareSerialNumber(Z)V
    .locals 0
    .parameter "value"

    .prologue
    .line 72
    sput-boolean p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoHardwareSerialNumber:Z

    .line 73
    return-void
.end method

.method public static setSimulateNoReadPhoneStatePermission(Z)V
    .locals 0
    .parameter "value"

    .prologue
    .line 60
    sput-boolean p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoReadPhoneStatePermission:Z

    .line 61
    return-void
.end method


# virtual methods
.method public getAndroidId()Ljava/lang/String;
    .locals 1

    .prologue
    .line 209
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mAndroidId:Ljava/lang/String;

    return-object v0
.end method

.method public getAppBundleName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 407
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getAppVersion()Ljava/lang/String;
    .locals 5

    .prologue
    .line 394
    iget-object v2, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mAppVersion:Ljava/lang/String;

    if-nez v2, :cond_0

    .line 396
    :try_start_0
    iget-object v2, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    .line 397
    iget-object v3, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mContext:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v1

    .line 398
    .local v1, pInfo:Landroid/content/pm/PackageInfo;
    iget-object v2, v1, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String;

    iput-object v2, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mAppVersion:Ljava/lang/String;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 403
    .end local v1           #pInfo:Landroid/content/pm/PackageInfo;
    :cond_0
    :goto_0
    iget-object v2, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mAppVersion:Ljava/lang/String;

    return-object v2

    .line 399
    :catch_0
    move-exception v0

    .line 400
    .local v0, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    const-string v2, ""

    iput-object v2, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mAppVersion:Ljava/lang/String;

    goto :goto_0
.end method

.method public getCarrierCountry()Ljava/lang/String;
    .locals 1

    .prologue
    .line 378
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mCarrierCountry:Ljava/lang/String;

    return-object v0
.end method

.method public getCarrierName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 382
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mCarrierName:Ljava/lang/String;

    return-object v0
.end method

.method public getConnectionType()Ljava/lang/String;
    .locals 1

    .prologue
    .line 386
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mConnectionType:Ljava/lang/String;

    return-object v0
.end method

.method public getHardwareSerialNumber()Ljava/lang/String;
    .locals 5

    .prologue
    .line 175
    iget-object v3, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mHardwareSerialNumber:Ljava/lang/String;

    if-nez v3, :cond_0

    .line 176
    sget-boolean v3, Lcom/sponsorpay/sdk/android/utils/HostInfo;->sSimulateNoHardwareSerialNumber:Z

    if-nez v3, :cond_1

    .line 177
    const/4 v1, 0x0

    .line 179
    .local v1, serialField:Ljava/lang/reflect/Field;
    :try_start_0
    const-class v3, Landroid/os/Build;

    const-string v4, "SERIAL"

    invoke-virtual {v3, v4}, Ljava/lang/Class;->getField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v1

    .line 180
    const/4 v3, 0x0

    invoke-virtual {v1, v3}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    .line 181
    .local v2, serialValue:Ljava/lang/Object;
    if-eqz v2, :cond_0

    invoke-virtual {v2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v3

    const-class v4, Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 182
    check-cast v2, Ljava/lang/String;

    .end local v2           #serialValue:Ljava/lang/Object;
    iput-object v2, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mHardwareSerialNumber:Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 193
    .end local v1           #serialField:Ljava/lang/reflect/Field;
    :cond_0
    :goto_0
    iget-object v3, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mHardwareSerialNumber:Ljava/lang/String;

    return-object v3

    .line 184
    .restart local v1       #serialField:Ljava/lang/reflect/Field;
    :catch_0
    move-exception v0

    .line 187
    .local v0, e:Ljava/lang/Exception;
    const-string v3, ""

    iput-object v3, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mHardwareSerialNumber:Ljava/lang/String;

    goto :goto_0

    .line 190
    .end local v0           #e:Ljava/lang/Exception;
    .end local v1           #serialField:Ljava/lang/reflect/Field;
    :cond_1
    const-string v3, ""

    iput-object v3, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mHardwareSerialNumber:Ljava/lang/String;

    goto :goto_0
.end method

.method public getLanguageSetting()Ljava/lang/String;
    .locals 1

    .prologue
    .line 202
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mLanguageSetting:Ljava/lang/String;

    return-object v0
.end method

.method public getManufacturer()Ljava/lang/String;
    .locals 1

    .prologue
    .line 390
    sget-object v0, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;

    return-object v0
.end method

.method public getOsVersion()Ljava/lang/String;
    .locals 1

    .prologue
    .line 159
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mOsVersion:Ljava/lang/String;

    return-object v0
.end method

.method public getPhoneVersion()Ljava/lang/String;
    .locals 1

    .prologue
    .line 168
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mPhoneVersion:Ljava/lang/String;

    return-object v0
.end method

.method public getScreenDensityCategory()Ljava/lang/String;
    .locals 2

    .prologue
    .line 300
    iget-object v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityCategory:Ljava/lang/String;

    if-nez v1, :cond_0

    .line 301
    invoke-direct {p0}, Lcom/sponsorpay/sdk/android/utils/HostInfo;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v1

    iget v0, v1, Landroid/util/DisplayMetrics;->densityDpi:I

    .line 303
    .local v0, densityCategoryDpi:I
    sparse-switch v0, :sswitch_data_0

    .line 314
    invoke-direct {p0, v0}, Lcom/sponsorpay/sdk/android/utils/HostInfo;->getScreenDensityCategoryFromModernAndroidDevice(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityCategory:Ljava/lang/String;

    .line 317
    .end local v0           #densityCategoryDpi:I
    :cond_0
    :goto_0
    iget-object v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityCategory:Ljava/lang/String;

    return-object v1

    .line 305
    .restart local v0       #densityCategoryDpi:I
    :sswitch_0
    const-string v1, "MEDIUM"

    iput-object v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityCategory:Ljava/lang/String;

    goto :goto_0

    .line 308
    :sswitch_1
    const-string v1, "HIGH"

    iput-object v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityCategory:Ljava/lang/String;

    goto :goto_0

    .line 311
    :sswitch_2
    const-string v1, "LOW"

    iput-object v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityCategory:Ljava/lang/String;

    goto :goto_0

    .line 303
    nop

    :sswitch_data_0
    .sparse-switch
        0x78 -> :sswitch_2
        0xa0 -> :sswitch_0
        0xf0 -> :sswitch_1
    .end sparse-switch
.end method

.method public getScreenDensityX()Ljava/lang/String;
    .locals 4

    .prologue
    .line 364
    const/4 v0, 0x0

    iget v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityX:F

    cmpl-float v0, v0, v1

    if-nez v0, :cond_0

    .line 365
    invoke-direct {p0}, Lcom/sponsorpay/sdk/android/utils/HostInfo;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iget v0, v0, Landroid/util/DisplayMetrics;->xdpi:F

    iput v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityX:F

    .line 367
    :cond_0
    const-string v0, "%d"

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    iget v3, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityX:F

    invoke-static {v3}, Ljava/lang/Math;->round(F)I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getScreenDensityY()Ljava/lang/String;
    .locals 4

    .prologue
    .line 371
    const/4 v0, 0x0

    iget v1, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityY:F

    cmpl-float v0, v0, v1

    if-nez v0, :cond_0

    .line 372
    invoke-direct {p0}, Lcom/sponsorpay/sdk/android/utils/HostInfo;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iget v0, v0, Landroid/util/DisplayMetrics;->ydpi:F

    iput v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityY:F

    .line 374
    :cond_0
    const-string v0, "%d"

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    iget v3, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenDensityY:F

    invoke-static {v3}, Ljava/lang/Math;->round(F)I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getScreenHeight()Ljava/lang/String;
    .locals 4

    .prologue
    .line 357
    iget v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenHeight:I

    if-nez v0, :cond_0

    .line 358
    invoke-direct {p0}, Lcom/sponsorpay/sdk/android/utils/HostInfo;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iget v0, v0, Landroid/util/DisplayMetrics;->heightPixels:I

    iput v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenHeight:I

    .line 360
    :cond_0
    const-string v0, "%d"

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    iget v3, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenHeight:I

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getScreenWidth()Ljava/lang/String;
    .locals 4

    .prologue
    .line 350
    iget v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenWidth:I

    if-nez v0, :cond_0

    .line 351
    invoke-direct {p0}, Lcom/sponsorpay/sdk/android/utils/HostInfo;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iget v0, v0, Landroid/util/DisplayMetrics;->widthPixels:I

    iput v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenWidth:I

    .line 353
    :cond_0
    const-string v0, "%d"

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    iget v3, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mScreenWidth:I

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getUDID()Ljava/lang/String;
    .locals 1

    .prologue
    .line 150
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mUDID:Ljava/lang/String;

    return-object v0
.end method

.method public getWifiMacAddress()Ljava/lang/String;
    .locals 1

    .prologue
    .line 216
    iget-object v0, p0, Lcom/sponsorpay/sdk/android/utils/HostInfo;->mWifiMacAddress:Ljava/lang/String;

    return-object v0
.end method
